#pragma once

#include "AnonymousPipe.h"

// COutputRichEdit

class COutputRichEdit : public CRichEditCtrl, public IPipeObserver
{
	DECLARE_DYNAMIC(COutputRichEdit)

private:
	enum 
	{
		IDM_POPUP_SELECTALL = (AFX_IDW_PANE_FIRST + 101),
		IDM_POPUP_COPY_SEL,
		IDM_POPUP_CLEAR
	};

public:
	COutputRichEdit();
	virtual ~COutputRichEdit();

	virtual void    OnWrite(const void* pData, DWORD nDataLen);
	virtual void    OnRead(const void* pData, DWORD nDataLen);
protected:
	//lint --e{1511,1516} suppress 'Member hides non-virtual member'
	//{{AFX_MSG(COutputRichEdit)
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnPopupSelectall();
	afx_msg void OnPopupClear();
	afx_msg void OnPopupCopySel();
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()

	CMenu	m_Menu;
	//CAsyncAnonymousPipe m_anonymousPipe;
public:
	afx_msg void OnContextMenu(CWnd* /*pWnd*/, CPoint /*point*/);
};


